package com.bjsxt.usercenter.common.util;

import java.util.HashMap;
import java.util.Map;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

public class ConstatFinalUtil
{
	
	/*日志文件*/
	public static Logger LOGGER = LogManager.getLogger(ConstatFinalUtil.class);
	
	/*json配置文件*/
	public static JSONObject RESOURCE_JSON =new JSONObject();
	/*jsonINFO信息*/
	public static JSONObject INFO_JSON = new JSONObject();
	
	/*MAP容器*/
	public static Map<Object, Object> TOOKEN_MAP=new HashMap<Object, Object>();
	
	public static String ALLSTR ="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
	/*静态代码块*/
	
	static{
		
		FileUtil fileUtil = new FileUtil();
		try
		{
			String resourceStr =fileUtil.readFile(ConstatFinalUtil.class.getClassLoader().getResourceAsStream("resourceInfo.json"));
			RESOURCE_JSON =(JSONObject) JSON.parse(resourceStr);
			INFO_JSON=RESOURCE_JSON.getJSONObject("info");
			ConstatFinalUtil.LOGGER.info("josn配置文件");
		} catch (Exception e)
		{
			
			ConstatFinalUtil.LOGGER.error("joson转换报错",e);
		}
	}
}
